package com.fengye.algorithms.leecode.mianshi;

import java.util.List;
import java.util.Scanner;

/**
 * @Author fengye
 * @Date 2023/3/2 14:23
 **/
public class HanotaMain {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
    }

    public static void move(List<Integer> A, List<Integer> B, List<Integer> C, int n) {
        if(n==1) {
            C.add(A.remove(A.size() - 1));
            return;
        }

        move(A, C, B, n-1);
        C.add(A.remove(A.size() - 1));
        move(B,A,C, n-1);
    }

    public static void hanota(List<Integer> A, List<Integer> B, List<Integer> C) {
        if(A.size() <= 2) {
            C.addAll(A);
        } else {
            int i=0;
            while(A.size()>0) {
                B.addAll(A.subList(1, A.size()));
                C.add(A.get(0));
                A.clear();
                A.addAll(B);
                B.clear();
            }
        }

        C.stream().forEach(System.out::print);
    }
}
